<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jquery.min.js"></script>
    <script src="./js/echars.js"></script>
    <style>
        * {
            margin: 0 auto;
            padding: 0;
        }

        .box {
            width: 300px;
            height: 300px;
        }
    </style>
</head>
<body>
    <div class="box"></div>

    <script>
        $(function() {
            var myChart = echarts.init($('.box')[0]);
            var option= {
                xAxis: {data:[]},
                yAxis: {},
                animationDuration: 2000,
                animationEasing: 'bounceOut',
                series: [{
                    type: 'bar',
                    data: [],
                }]
            }
            for (var i = 0; i < 10; i++) {
                option.series[0].data.push(Math.random() * 100);
                option.xAxis.data.push(i + '-');
            }
            myChart.setOption(option);

        })
    </script>
</body>
</html>